package com.yocard.yxyd.ui.contract;

import android.widget.LinearLayout;

import com.yocard.yxyd.base.BasePresenter;
import com.yocard.yxyd.base.BaseView;
import com.yocard.yxyd.http.model.base.Response;
import com.yocard.yxyd.http.model.response.CsmPayInfo;
import com.yocard.yxyd.http.model.response.OrderListBean;
import com.yocard.yxyd.http.model.response.OrderPayResponseBean;
import com.yocard.yxyd.http.model.response.UserInfoBean;
import com.zhy.view.flowlayout.TagFlowLayout;

import java.util.List;

/**
 * Created on 2019/4/8.
 */
public interface OrderDetailContact {
    interface View extends BaseView {
        void onFetchData(OrderListBean.OrderList orderListBean);
        void onFetchUser(UserInfoBean data);
        void onCreatedOrder(String orderId);
        void onFetchOrderData(CsmPayInfo csmOrderBean);
        void onPaySuccess(OrderPayResponseBean data);
        void onPayFailed(String msg);
        //处理假数据的回调，订单已被抢走
        void onOrderReceived(Response response);
    }

    interface Presenter extends BasePresenter<View> {
        void commit(String listId);
        void fetchUserData();
        void fetchData(String id);
        void fillView(LinearLayout llContainer, OrderListBean.OrderList orderListBean);
        void fillZiliao(TagFlowLayout flowLayout, List<String> ziliao);
        void doPay(String id, int delay);
    }
}
